
class Example {
    static void main(String[] args){
        Student stu = new Student();
        stu.name = "Jackie";
        stu.id = 1;
        println stu.display()
    }
}

public class Student{
    String name;
    int id;

    String display(){
        return name + id;
    }
}

class StudentTest extends GroovyTestCase {
    void testDisplay(){
        def stud = new Student(name: 'Jackie', id:1)
        def expected = 'Jackie1'
        assertToString(stud.display(), expected)
    }
}